Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Creating and Removing Controls /


DisposeControl

CHANGED WITH THE APPEARANCE MANAGER

Removes a particular control and its embedded controls from a window that you wish to keep.

pascal void DisposeControl (ControlHandle theControl);
theControl
On input, a handle to the control you wish to remove.
DISCUSSION
The DisposeControl function removes the specified control (and any embedded controls it may possess) from the screen, deletes it from the window's control list, and releases the memory occupied by the control structure and any data structures associated with the control. Passing the root control to this function is the effectively the same as calling KillControls. If an embedding hierarchy is present, DisposeControl disposes of the controls embedded within a control before disposing of the container control.

SPECIAL CONSIDERATIONS
The Window Manager functions CloseWindow and DisposeWindow automatically dispose of all controls associated with the given window.

SEE ALSO
"Embedding Controls".

WHEN THE APPEARANCE MANAGER IS NOT AVAILABLE
DisposeControl does not dispose of embedded controls, because embedding hierarchies are not supported.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998